package com.newgoldcurrency.view;
import android.app.Activity;
import android.app.Dialog;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;

import com.newgoldcurrency.databinding.DialogLoadingBinding;

public class LoadingDialog extends Dialog {
    private final DialogLoadingBinding binding;
    public LoadingDialog(Activity activity) {
        super(activity);
        getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        binding = DialogLoadingBinding.inflate(activity.getLayoutInflater());
        binding.dialogLoadingLogo.setAnimation(new RotateAnimation());
        setContentView(binding.getRoot());
        setCancelable(false);
    }
    public LoadingDialog setMessage(String message) {
        binding.loadingText.setText(message);
        return this;
    }
}